package com.pkk.spring.cloud.service.rpc.response;

import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 响应参数
 *
 * @author peikunkun
 * @version V1.0
 * @date 2021-01-06 14:14
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ResponseHeader<C> implements Serializable {

  private static final long serialVersionUID = -5708321972791983001L;


  /**
   * 请求主键ID
   */
  private String id;


  /**
   * 响应码
   */
  private C code;


  /**
   * 响应消息
   */
  private String message;

  /**
   * 用于跟踪链路的全局id
   */
  private String chainId;

  /**
   * 时间戳
   */
  private final String timestamp = String.valueOf(System.currentTimeMillis());
}
